﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using APPLICATION.DataAccess;

namespace APPLICATION.Dict.dtAny
{
    public partial class frmAny : Form
    {
        public int managerID;
        public string dictName;
        public int Dcode;

        public frmAny()
        {
            InitializeComponent();
        }

        private void frmAny_Load(object sender, EventArgs e)
        {
            lblDitionaryName.Text = dictName;
            DataAccess.dbAny any = new dbAny();
            fnGetAnyBindingSource.DataSource = any.dtAny(1,Dcode);
            grAny.DataSource = fnGetAnyBindingSource;

            
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmEditAny frmNew = new frmEditAny();
            frmNew.dictionaryFormName = this.Text;
            frmNew.ShowDialog();
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            frmEditAny frmNew = new frmEditAny();
            frmNew.bsAny = fnGetAnyBindingSource;
            frmNew.dictionaryFormName = this.Text;
            frmNew.ShowDialog();
        }
    }
}
